﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AdministratorsSearch.ascx.cs" Inherits="GPSTrackingWebsiteManager.Manager.UserControls.AdministratorsSearch" %>

<style type="text/css">
    .auto-style1 {
        width: 100%;
    }
    .auto-style2 {
        width: 113px;
    }
</style>

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">

        function OpenAdministratorsSearch() {
            var wnd = $find('<%=rwAdministratorsSearch.ClientID %>');
                    wnd.show();
                }

        function CloseAdministratorsSearch() {
                    var wnd = $find('<%=rwAdministratorsSearch.ClientID %>');
                    wnd.close();
        }

    </script>
</telerik:RadScriptBlock>

<telerik:RadWindow ID="rwAdministratorsSearch" runat="server" Width="700px" Height="500px" EnableShadow="true" Behaviors="Close" ShowContentDuringLoad="false" VisibleStatusbar="false" Modal="true">
    <ContentTemplate>
            <table>
                <tr>
                    <td>Admin Username</td>
                    <td>Nombre</td>
                    <td>Apellido 1</td>
                    <td>Apellido 2</td>
                </tr>
                <tr>
                    <td>
                        <telerik:RadTextBox ID="txtSearchAdminUsername" runat="server" Width="100%">
                        </telerik:RadTextBox>
                    </td>
                    <td>
                        <telerik:RadTextBox ID="txtSearchName" runat="server" Width="100%">
                        </telerik:RadTextBox>
                    </td>
                    <td>
                        <telerik:RadTextBox ID="txtSearchFirstName" runat="server" Width="100%">
                        </telerik:RadTextBox>
                    </td>
                    <td>
                        <telerik:RadTextBox ID="txtSearchLastName" runat="server" Width="100%">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="text-align: center">
                        <telerik:RadButton ID="btnSearchAdministrators" runat="server" Text="Buscar" OnClick="btnAdministratorsSearch_Click">
                        </telerik:RadButton>
                    </td>
                </tr>

                <tr>
                    <td colspan="4" style="text-align: left">
                        <br/>
                        <telerik:RadGrid ID="AdministratorsGrid" runat="server" AutoGenerateColumns="False" AllowMultiRowSelection="true" CellSpacing="0" GridLines="None" Height="315px" Width="100%" OnNeedDataSource="AdministratorsGrid_NeedDataSource" AllowSorting="true">
                            <ClientSettings>
                                <Selecting AllowRowSelect="True" />
                            </ClientSettings>
                            <MasterTableView EditMode="PopUp" EditFormSettings-PopUpSettings-Modal="true" EditFormSettings-CaptionFormatString="Modo Edición" NoMasterRecordsText="No hay registros encontrados">
                                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

                                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                                    <HeaderStyle Width="20px"></HeaderStyle>
                                </RowIndicatorColumn>

                                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                                    <HeaderStyle Width="20px"></HeaderStyle>
                                </ExpandCollapseColumn>

                                <Columns>
                                    <telerik:GridClientSelectColumn DataType="System.Boolean" UniqueName="Selected" ItemStyle-Width="20px">
                                    </telerik:GridClientSelectColumn>
                                    <telerik:GridBoundColumn DataField="AdminUsername" HeaderText="Admin Username" UniqueName="AdminUsername" ForceExtractValue="Always" ItemStyle-Width="150px" HeaderStyle-Width="150px">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Name" HeaderText="Nombre" UniqueName="Name" ItemStyle-Width="150px" HeaderStyle-Width="150px">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="Apellido 1" UniqueName="FirstName" ItemStyle-Width="150px" HeaderStyle-Width="150px">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="LastName" HeaderText="Apellido 2" UniqueName="LastName" ItemStyle-Width="150px" HeaderStyle-Width="150px">
                                    </telerik:GridBoundColumn>
                                </Columns>

                                <EditFormSettings>
                                    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                                </EditFormSettings>

                                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                            </MasterTableView>
                            
                            <ClientSettings EnableRowHoverStyle="true">
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
                                </Scrolling>  <Selecting AllowRowSelect="True"></Selecting><ClientEvents OnPopUpShowing="PopUpShowing" />
                            </ClientSettings>

                            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>

                            <FilterMenu EnableImageSprites="False"></FilterMenu>
                        </telerik:RadGrid>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="text-align: center">
                        <telerik:RadButton ID="btnAdministratorsOK" runat="server" Text="Aceptar" OnClick="btnAdministratorsOK_Click" OnClientClicked="CloseAdministratorsSearch"></telerik:RadButton>
                        <telerik:RadButton ID="btnAdministratorsCancel" runat="server" Text="Cancelar" OnClick="btnAdministratorsCancel_Click" OnClientClicked="CloseAdministratorsSearch"></telerik:RadButton>
                    </td>
                </tr>
            </table>
        <telerik:RadWindowManager ID="RadWindowManager2" runat="server"></telerik:RadWindowManager>
    </ContentTemplate>
</telerik:RadWindow>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel3" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSearchAdministrators">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="AdministratorsGrid" LoadingPanelID="RadAjaxLoadingPanel3" UpdatePanelCssClass="" />                
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnAdministratorsOK">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="AdministratorsSelectedGrid" LoadingPanelID="RadAjaxLoadingPanel3" UpdatePanelCssClass="" />                
                <telerik:AjaxUpdatedControl ControlID="AdministratorsGrid"/>                
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnAdministratorsCancel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="AdministratorsSelectedGrid" LoadingPanelID="RadAjaxLoadingPanel3" UpdatePanelCssClass="" />                
                <telerik:AjaxUpdatedControl ControlID="AdministratorsGrid"/>                
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
